<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateWorshipHymnsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('worship_hymns', function (Blueprint $table) {
            $table->increments('id')->comment('ID');
            $table->string('name', 100)->nullable()->comment('歌名');
            $table->text('content')->nullable()->comment('歌词');
            $table->string('remark')->nullable()->comment('歌名备注');
            $table->string('artists', 50)->nullable()->comment('作者');
            $table->string('albums', 50)->nullable()->comment('专辑');
            $table->integer('duration')->nullable()->default(0)->comment('歌曲时长');
            $table->integer('pop')->nullable()->default(0)->comment('人气指数');
            $table->integer('lyric')->nullable()->index('worship_hymns_lyric')->comment('LRC歌词');
            $table->integer('mp3')->nullable()->index('worship_hymns_mp3')->comment('mp3');
            $table->string('spectrum', 50)->nullable()->comment('歌谱');
            $table->timestamp('created_at')->nullable()->comment('创建时间');
            $table->timestamp('updated_at')->nullable()->comment('更新时间');
            $table->softDeletes()->comment('删除时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('worship_hymns');
    }
}
